remove n characters from string python

35

line = line.strip('\n')
line = line.strip('\t')
mylist = []
# Assuming that you have loaded data into a lines variable. 
for line in lines:
    mylist.append(line.strip().split('\t')

Comments

Submit
0 Comments